package com.briup.day23;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.util.Scanner;

public class Test_Append {
    public static void main(String[] args) throws Exception {
        OutputStream os= new FileOutputStream("01-Basic/src/dir/a.txt",true);
        Scanner sc=new Scanner(System.in);
        System.out.println("亲输入一行字符串内容");
        String str=sc.nextLine();
        byte[] buf=str.getBytes();
        os.write(buf);
        System.out.println("写入完成");
        os.close();
    }
}
